package com.shiguiwu.springboot3.rockectmq.consumer.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @description: 监听消息
 * @author: stone
 * @date: Created by 2023/11/11 18:03
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springboot3.message.rockectmq.consumer.listener
 */
@Slf4j
@Component
@RocketMQMessageListener(consumerGroup = "boot_group_1", topic = "string-topic")
public class TestConsumerListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String msg) {
        log.warn("消息消费 ============> {}", msg);
    }
}
